<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			div{
				width: 300px;
				background-color: rgba(0,0,0,0.3);
				padding: 10px;
				position: relative;/* 参照物 */
			}
			input{
				width: 260px;/* 300-20*2内边距 */
				padding: 10px 20px;
				border: none;
			}
			img{
				position: absolute;
				top: 14px;
				right: 28px;
			}
			p{
				margin: 0;
				font-size: 14px;
				color: red;
			}
		</style>
	</head>
	<body>
		<div>
			<input type="text" placeholder="请输入用户名" />
			<img src="http://doc.canglaoshi.org/tstore_v1/images/login/yhm.png" alt="" />
			<p>用户名不能为空</p>
		</div>
	</body>
</html>
